package com.tourismhengyang.beans;

public class Hotel {
	private int hid;
	private int lid;
	private String hname;
	private String htype;
	private double hprice;
	private String htel;
	private String haddr;
	
	@Override
	public String toString() {
		return "Hotel [hid=" + hid + ", lid=" + lid + ", hname=" + hname + ", htype=" + htype + ", hprice=" + hprice
				+ ", htel=" + htel + ", haddr=" + haddr + "]";
	}

	public int getHid() {
		return hid;
	}

	public void setHid(int hid) {
		this.hid = hid;
	}

	public int getLid() {
		return lid;
	}

	public void setLid(int lid) {
		this.lid = lid;
	}

	public String getHname() {
		return hname;
	}

	public void setHname(String hname) {
		this.hname = hname;
	}

	public String getHtype() {
		return htype;
	}

	public void setHtype(String htype) {
		this.htype = htype;
	}

	public double getHprice() {
		return hprice;
	}

	public void setHprice(double hprice) {
		this.hprice = hprice;
	}

	public String getHtel() {
		return htel;
	}

	public void setHtel(String htel) {
		this.htel = htel;
	}

	public String getHaddr() {
		return haddr;
	}

	public void setHaddr(String haddr) {
		this.haddr = haddr;
	}

	public Hotel(int hid, int lid, String hname, String htype, double hprice, String htel, String haddr) {
		super();
		this.hid = hid;
		this.lid = lid;
		this.hname = hname;
		this.htype = htype;
		this.hprice = hprice;
		this.htel = htel;
		this.haddr = haddr;
	}

	public Hotel() {
		super();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((haddr == null) ? 0 : haddr.hashCode());
		result = prime * result + hid;
		result = prime * result + ((hname == null) ? 0 : hname.hashCode());
		long temp;
		temp = Double.doubleToLongBits(hprice);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + ((htel == null) ? 0 : htel.hashCode());
		result = prime * result + ((htype == null) ? 0 : htype.hashCode());
		result = prime * result + lid;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Hotel other = (Hotel) obj;
		if (haddr == null) {
			if (other.haddr != null)
				return false;
		} else if (!haddr.equals(other.haddr))
			return false;
		if (hid != other.hid)
			return false;
		if (hname == null) {
			if (other.hname != null)
				return false;
		} else if (!hname.equals(other.hname))
			return false;
		if (Double.doubleToLongBits(hprice) != Double.doubleToLongBits(other.hprice))
			return false;
		if (htel == null) {
			if (other.htel != null)
				return false;
		} else if (!htel.equals(other.htel))
			return false;
		if (htype == null) {
			if (other.htype != null)
				return false;
		} else if (!htype.equals(other.htype))
			return false;
		if (lid != other.lid)
			return false;
		return true;
	}
}
